package com.utilities.parsers;

import java.util.ArrayList;
import java.util.Set;

import com.utilities.IO.FileUtilities;
import com.utilities.dataStructures.Range;
import com.utilities.fastaUtilities.FindGenes;
import com.utilities.fastaUtilities.OtherUtilities;

public class test_old {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception 
	{
		//		ContigStats contigStats = new ContigStats(true, "c:/database/latest/52_test.fna");
		//		String[] arg = new String[1];
		//		arg[0] = "c:/database/latest/52.fna";
		//		contigStats.main(arg);
		//		String workspace = "C:/Users/bansalp/Desktop/UZH/newCosmid/run1run2/all/";
		String workspace = "C:/Users/bansalp/home/Desktop/UZH/newCosmid/run1run2/all/";
		//		MapperContigStats contigStats = new MapperContigStats(true, workspace + "contigs.fna", workspace + "scaffold.txt", 
		//				workspace + "gapList.txt", workspace + "contigList.txt", workspace + "vxml.xml");
		//		contigStats.main(null);
//		FindGenes findGenes = new FindGenes();
//		findGenes.setInputFile(workspace + "gene_cluster.gb").setOutpuFile(workspace + "cluster_genes.fa")
//		.setGeneRangesFile(workspace + "geneRanges.txt").findGenes();
		//		ArrayList<Range> genes = findGenes.getGeneRanges();

//		PrimerGenerator generator = new PrimerGenerator("C:/Users/bansalp/Desktop/UZH/newCosmid/run1run2/all/gapList.txt", 
//		"C:/Users/bansalp/Desktop/UZH/newCosmid/run1run2/all/segmentList4.txt");
//		ArrayList<Range> genes = generator.findPrimers();
		
		String inputcontigsfile = workspace + "contigs.fna";
		String outputSegmentFile = workspace + "segment_new.fna";
		PrimeFinder finder = new PrimeFinder();
		ArrayList<Range> genes = finder.find(inputcontigsfile,outputSegmentFile);

//		workspace = "C:/Users/bansalp/Desktop/UZH/newCosmid/run1run2/all/";
		MapperContigStats contigStats = new MapperContigStats(true, workspace + "contigs.fna", workspace + "scaffold.txt", 
				workspace + "gapList.txt", workspace + "contigList.txt", workspace + "vxml2.xml");
		contigStats.setGeneList(genes).main(null);


		//		Set<String> genes = OtherUtilities.fastaHeader("C:/Users/bansalp/Desktop/UZH/genes.fa");
		//		FileUtilities.writeToFile(genes, "C:/Users/bansalp/Desktop/UZH/geneNames.txt");
	}

}
